home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 2 / CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso / magazine / amiga_e / amigae.july.archive / 000085_crash!axion.bt.…uk!D.Higginson_Tue, 27 Jul 93 07:50:47 PST.msg < prev    next >
Text File  |  1993-08-31  |  1KB  |  36 lines

  1. Received: by bkhouse.cts.com (V1.16/Amiga)
  2.     id AA00000; Tue, 27 Jul 93 07:50:47 PST
  3. Received: from zaphod.axion.bt.co.uk by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #15) id m0oKqHq-0000EvC; Tue, 27 Jul 93 07:45 PDT
  5. Received: from elephant.axion.bt.co.uk by zaphod.axion.bt.co.uk with SMTP (PP); Tue, 27 Jul 1993 15:45:19 +0100
  6. Message-Id: <m0oKqHq-0000EvC@crash.cts.com>
  7. Date: Tue, 27 Jul 93 15:45:16 BST
  8. From: D.Higginson@axion.bt.co.uk
  9. To: AmigaE@bkhouse.cts.com
  10. Cc: D.Higginson@axion.bt.co.uk
  11. Subject: Initialising variables in objects
  12.  
  13.  
  14. Why is it that sometimes you can write something like:
  15.  
  16. object.field:=variable
  17.  
  18. and it will work fine, but if you try:
  19.  
  20. object.field:=function()
  21.  
  22. then EC will stop in its tracks and present you with an
  23. 'illegal reference' or some such error message.
  24.  
  25. However, if you assign the value to a variable first,
  26. everything is ok:
  27.  
  28. fred:=function()
  29. object.field:=fred
  30.  
  31. I know that I have already got a way of getting round
  32. this, but it's not very elegant, is it?
  33.  
  34. Perhaps I am missing something (like my brain :-)...
  35.  
  36. Dave.